﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<LifeShare1.Media.MovieInfo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	MovieIndex
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>所有电影</h2>
    <%=Html.ValidationSummary("添加资源失败！") %>
   <%using (Html.BeginForm("AddMovie")) 
       {%>
       <div>
             <label>IMDB:</label>
            <%=Html.TextArea("IMDBInput", new { rows = 1, cols = 30 })%>
            <%=Html.ValidationMessage("IMDBInput", "*")%>
            <input type="submit" value="添加资源" />
        </div>
       <%} %>
    
    <%foreach (var items in Model){ %>
    <div class="myMusic">
        <h4><%= Html.ActionLink(items.title, "MovieInfoDetails", new {items.ResourceID})%></h4>
            <img src="<%=Html.Encode(items.imageURL) %>" alt="<%= Html.Encode(items.title)%>"/>
        <ul>
        导演：<%= Html.Encode(items.director)%>/<%=Html.Encode(items.year) %>
        <br/>
        <%=Html.Encode(items.movieDuration) %>
        <br/>
        <%= Html.Encode(items.ratingAverage)%>(<%= Html.Encode(items.numRaters)%>评价)
        </ul>
    </div>
    
    <%} %>
    
    
    <%--<%=Html.ActionLink("<<前一页","BookIndex",new{page=(int)ViewData["page"]-1} %>|
    <%=Html.ActionLink("后一页>>","BookIndex",new{page=(int)ViewData["page"]+1} %>--%>
    
</asp:Content>

